<?php

/**
 * @version		$Id: mod_back_rotator.php 
 * @package		Joomla
 * @copyright	Copyright (C) 2012 All rights reserved.
 */
// no direct access
defined('_JEXEC') or die('Restricted access');

// Include the syndicate functions only once
require_once (dirname(__FILE__) . DS . 'helper.php');

$link = $params->get('link');

//$folder = modBackRotatorHelper::getFolder($params);

//$images	= modBackRotatorHelper::getImages($params, $folder);


if ($params->get('folderJson') != ''){
    $JSONfolder = modBackRotatorHelper::getFolder($params,'folderJson');
    $imgFolder = modBackRotatorHelper::getFolder($params,'folderImgForJson');
    $images = modBackRotatorHelper::getImgLinkFromFile($params,$imgFolder, $JSONfolder);
}
else{
    $folder = modBackRotatorHelper::getFolder($params,'folder');
    $images = modBackRotatorHelper::getImgLink($params);
}
    

if (!count($images)) {
    echo JText::_('No images ');
    return;
}


//thumbs 
$style= modBackRotatorHelper::getStyleForThumbs($params);

$setShowThumbs = modBackRotatorHelper::getSetShowThumbs($params);
$widthForThumbs = modBackRotatorHelper::getwidthThumb($params);
$heigthForThumbs = modBackRotatorHelper::getheigthThumb($params);

$widthDivsThumbs= modBackRotatorHelper::getWidthForDivsThumbs($params);
$heigthDivsThumbs= modBackRotatorHelper::getHeigthForDivsThumbs($params);

$animation= modBackRotatorHelper::getAnimationForThumbs($params);

//$image = modBackRotatorHelper::getRandomImage($params, $images);
$time = modBackRotatorHelper::getTime($params);
$divToCustomize = modBackRotatorHelper::getDiv($params);
require_once (JModuleHelper::getLayoutPath('mod_back_rotator'));
